<%--
  Created by IntelliJ IDEA.
  User: ghp
  Date: 2022/10/4
  Time: 9:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Web域相关对象</title>
</head>
<body>
<%--使用JSP的隐式对象将数据存入域对象中--%>
<% pageContext.setAttribute("student1","张三"); %>
<% request.setAttribute("student2","李四"); %>
<% session.setAttribute("student3","王五"); %>
<% application.setAttribute("student4","赵六"); %>
<%--使用EL的隐式对象取出域对象中的数据--%>
表达式\${pageScope.student1}的值为: ${pageScope.student1}<br/>
表达式\${requestScope.student2}的值为: ${requestScope.student2}<br/>
表达式\${sessionScope.student3}的值为: ${sessionScope.student3}<br/>
表达式\${applicationScope.student4}的值为: ${applicationScope.student4}<br/>
</body>
</html>
